package com.epam.chenjo.ms.web;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.epam.chenjo.ms.feign.integration.FeignIntegrationClient;
import com.epam.chenjo.ms.model.EmployeeDetails;


@RestController
//@RequestMapping("/bookmarkFeignClient")
public class EmployeeServiceFeignClientRestController {
	
	private FeignIntegrationClient feignIntegrationClient;
	
	@Autowired
	public EmployeeServiceFeignClientRestController(FeignIntegrationClient feignIntegrationClient) {
		this.feignIntegrationClient = feignIntegrationClient;
	}
	
	@RequestMapping("/employee-client-feign/{empId}")
	public EmployeeDetails employeeDetails(@PathVariable String empId){
		return this.feignIntegrationClient.getEmployeeDetails(empId);
	}	

}
